#内置函数zip()

#使用两个元组生成字典表达式
books = ["红楼梦" , "三国演义" , "西游记" , "水浒传"]
authors = ["曹雪芹" , "罗贯中" , "吴承恩" , "施耐庵"]

books_dict = {book:author for book ,author in zip(books , authors)}
print(books_dict)

str1 = "韩顺平"
dict_str = {ele1 : ele2 * 2 for ele1 , ele2 in zip(str1 , str1)}
print(dict_str)

#给出两个列表
english_list = ["red" , "black" , "yellow" , "white"]
chinese_list = ["红色" , "黑色" , "黄色" , "白色"]
dict_color = {en.upper() : ch for en , ch in zip(english_list , chinese_list)}
print(dict_color)





